package com.balabala.web;

import com.balabala.DTO.VideoDTO;
import com.balabala.service.AnimationService;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;

@RestController
public class AnimationController {

    @Autowired
    private AnimationService animationService;

    /**
     * 查询动漫分区日推
     *
     * @return
     */
    @GetMapping("DailyPush")
    public ResponseEntity<List<VideoDTO>> queryDailyPush() {
        List<VideoDTO> list = animationService.queryDailyPush();
        return ResponseEntity.ok(list);
    }

}
